﻿#ifndef _DB_ISPATIALFILTER_H
#define _DB_ISPATIALFILTER_H

#include "udatabase/interface/iqueryfilter.h"
#include "geometry/interface/igeometry.h"
#include "udatabase/dll_cfg.h"

namespace FD
{
	namespace Utility
	{
		namespace DB
		{
			namespace Interface
			{
				enum QueryOrderType
				{
					QOT_UNKNOWN                  = 0,
				};

				enum SpatialRelationEnum
				{
					SRE_UNKNOWN                  = 0,
				};
				///<summary>
				///空间查询过滤器
				///</summary>
				class FD_DB_Export ISpatialFilter : public FD::Utility::DB::Interface::IQueryFilter
				{
				public:		
					///<summary>
					///析构函数
					///</summary>
					virtual ~ISpatialFilter();
				public:
					///<summary>
					///获取查询几何体
					///</summary>
					///<param name=""></param>
					///<returns>返回几何体</returns>
					virtual FD::Kernel::Geometry::Interface::IGeometry* getGeometryRef() const;
					///<summary>
					///获取查询几何体拷贝
					///</summary>
					///<param name=""></param>
					///<returns>返回拷贝几何体</returns>
					virtual FD::Kernel::Geometry::Interface::IGeometry* getCopyGeometry() const;
					///<summary>
					///获取查询顺序
					///</summary>
					///<param name=""></param>
					///<returns>返回查询顺序</returns>
					virtual FD::Utility::DB::Interface::QueryOrderType getQueryOrder() const;
					///<summary>
					///获取查询空间关系枚举
					///</summary>
					///<param name=""></param>
					///<returns>返回空间关系枚举</returns>
					virtual FD::Utility::DB::Interface::SpatialRelationEnum getRelationEnum() const;
					///<summary>
					///获取查询空间关系矩阵
					///</summary>
					///<param name=""></param>
					///<returns>返回空间关系矩阵</returns>
					virtual String getSpatialRelationMatrix() const;
					///<summary>
					///设置查询几何体
					///</summary>
					///<param name="geom">几何体</param>
					///<returns></returns>
					virtual void setGeometry(const FD::Kernel::Geometry::Interface::IGeometry * geom);
					///<summary>
					///设置查询顺序
					///</summary>
					///<param name="type">顺序</param>
					///<returns></returns>
					virtual void setQueryOrder(FD::Utility::DB::Interface::QueryOrderType type);
					///<summary>
					///设置空间关系枚举
					///</summary>
					///<param name="type">空间关系枚举</param>
					///<returns></returns>
					virtual void setSpatialRelationEnum(FD::Utility::DB::Interface::SpatialRelationEnum relation);
					///<summary>
					///设置空间关系矩阵
					///</summary>
					///<param name="matrix">空间关系矩阵</param>
					///<returns></returns>
					virtual void setSpatialRelationMatrix(const String& matrix);

					virtual FD::Utility::DB::Interface::IQueryFilter * clone() const;

					//virtual ISpatialFilter * clone() const;
				protected:
					ISpatialFilter();
				private:
					ISpatialFilter(ISpatialFilter& obj);
				};
			}
		}
	}
}

#endif
